Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(flatten, app(app(node, x), xs)) → APP(app(cons, x), app(concat, app(app(map, flatten), xs)))
APP(flatten, app(app(node, x), xs)) → APP(concat, app(app(map, flatten), xs))
APP(app(append, app(app(cons, x), xs)), ys) → APP(append, xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
APP(concat, app(app(cons, x), xs)) → APP(app(append, x), app(concat, xs))
APP(concat, app(app(cons, x), xs)) → APP(concat, xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(cons, x), app(app(append, xs), ys))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(flatten, app(app(node, x), xs)) → APP(map, flatten)
APP(concat, app(app(cons, x), xs)) → APP(append, x)
APP(flatten, app(app(node, x), xs)) → APP(cons, x)
APP(flatten, app(app(node, x), xs)) → APP(app(map, flatten), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))

The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(flatten, app(app(node, x), xs)) → APP(app(cons, x), app(concat, app(app(map, flatten), xs)))
APP(flatten, app(app(node, x), xs)) → APP(concat, app(app(map, flatten), xs))
APP(app(append, app(app(cons, x), xs)), ys) → APP(append, xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
APP(concat, app(app(cons, x), xs)) → APP(app(append, x), app(concat, xs))
APP(concat, app(app(cons, x), xs)) → APP(concat, xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(cons, x), app(app(append, xs), ys))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(flatten, app(app(node, x), xs)) → APP(map, flatten)
APP(concat, app(app(cons, x), xs)) → APP(append, x)
APP(flatten, app(app(node, x), xs)) → APP(cons, x)
APP(flatten, app(app(node, x), xs)) → APP(app(map, flatten), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))

The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 10 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)

The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (4)x_1   
POL(append) = 0   
POL(cons) = 2   
POL(app(x1, x2)) = 1 + (3)x_2   
The value of delta used in the strict ordering is 12.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(concat, app(app(cons, x), xs)) → APP(concat, xs)

The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(concat, app(app(cons, x), xs)) → APP(concat, xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (4)x_2   
POL(cons) = 3   
POL(app(x1, x2)) = 1 + (4)x_2   
POL(concat) = 0   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(flatten, app(app(node, x), xs)) → APP(app(map, flatten), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)

The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(flatten, app(app(node, x), xs)) → APP(app(map, flatten), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = x_1 + (4)x_2   
POL(cons) = 0   
POL(map) = 1   
POL(node) = 2   
POL(app(x1, x2)) = 2 + x_1 + (2)x_2   
POL(flatten) = 0   
The value of delta used in the strict ordering is 16.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
app(flatten, app(app(node, x), xs)) → app(app(cons, x), app(concat, app(app(map, flatten), xs)))
app(concat, nil) → nil
app(concat, app(app(cons, x), xs)) → app(app(append, x), app(concat, xs))
app(app(append, nil), xs) → xs
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.